﻿using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;

namespace SpaceEngineersSaveEditor
{
    public class ObservableWorldCollection : ObservableCollection<World>
    {
        public ObservableWorldCollection(IEnumerable<string> worldList)
        {
            foreach (var worldPath in worldList)
            {
                var world = new World
                {
                    WorldPath = worldPath,
                    WorldName = Path.GetFileName(worldPath)
                };

                Add(world);
            }
        }
    }
}
